package com.hyt.it.ogt.ks.mq.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * 用于消息队列
 * @author liuhh
 */
@Data
@Accessors(chain = true)
@Builder
@ToString
@ApiModel(value = "考生信息")
public class CandidateInfoUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "考试ID")
    private String examId;

    @ApiModelProperty(value = "考生ID")
    private String candidateId;

    @ApiModelProperty(value = "试卷ID")
    private String paperId;

    @ApiModelProperty(value = "试卷版本号")
    private String paperVersion;

    @ApiModelProperty(value = "准考证号")
    private String admissionNumber;

    @ApiModelProperty(value = "是否强制收卷，1表示是，0表示否")
    private Boolean forbidEndExam;

    /**
     *  必须与CandidateStatusCode定义值一致
     */
    @ApiModelProperty(value = " 考生状态，0未开考，10：已登录；20：已开考；21:中断；30：已交卷/已完成；40：缺考")
    private Integer state;

    @ApiModelProperty(value = "考生考试实际开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    private LocalDateTime examBeginDate;

    @ApiModelProperty(value = "考生考试实际结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    private LocalDateTime examEndDate;

    @ApiModelProperty(value = "剩余时长")
    private Long remainingTime;

    @ApiModelProperty(value = "客观题总分数")
    private BigDecimal objectiveScore;

    @ApiModelProperty(value = "服务器IP", hidden = true)
    private String serverIP;
    
    @ApiModelProperty(value = "判分状态，1已判分，0待判分")
    private Boolean judgeScoreState;
    
    @ApiModelProperty(value = "迟到允许登录，1表示是，0表示否")
    private Boolean lateAllowLogin;
    
    @ApiModelProperty(value = "考试用时")
    private Long examUseTime;

    @ApiModelProperty(value = "登录时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    private LocalDateTime loginTime;

    private String loginIp;

    @ApiModelProperty(value = "交卷状态, 0未交卷、1手动交卷、2强制交卷、3切屏交卷、4超时交卷、6申请跳过人脸识别不通过强制收卷")
    private Integer finishState;
}
